/*
 * statistics_driver.cpp
 *
 *  Created on: 25/02/2012
 *      Author: Manuel Cortés / Juan Castellanos
 */

#include "tournament.h"

using namespace std;

int main( void )
{
	int array_size;
	team *competitors;
	ifstream ifs;
	string filePath = "list.txt";
	string line;
	
	ifs.open( filePath.c_str() );
	ifs >> line;
	array_size = atoi( line.c_str() );
	competitors = new team[ array_size  ];	
	ifs.close();
	
	if ( tournament::readFile( competitors, filePath.c_str() ) ){
		cout << "Fin del proceso ..." << endl;
	}else{
		tournament p( competitors, array_size );
		p.print( );
		//~ p.doubleRoundRobin( );
	}
	
	return EXIT_SUCCESS;
}
